package com.lagou.bean;

import com.lagou.service.HelloService;
import com.lagou.service.HelloServiceC;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Component;

@Component
public class ConsumerComponent {

    @Reference
    private HelloService helloService;

    @Reference
    private HelloServiceC helloServiceC;

    public String sayHello(String name, int timeToWait) {

        String s1  = helloService.sayHello(name, timeToWait);
        String s2  = helloServiceC.sayHello(name, timeToWait);

        return s1+s2;

    }
}
